load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "hybrid",
    srcs = [
        "ecies_aead_hkdf_dem_helper.go",
        "ecies_aead_hkdf_private_key_manager.go",
        "ecies_aead_hkdf_public_key_manager.go",
        "hpke_private_key_manager.go",
        "hpke_public_key_manager.go",
        "hybrid.go",
        "hybrid_decrypt_factory.go",
        "hybrid_encrypt_factory.go",
        "hybrid_key_templates.go",
    ],
    importpath = "github.com/google/tink/go/hybrid",
    visibility = ["//visibility:public"],
    deps = [
        "//aead",
        "//core/cryptofmt",
        "//core/primitiveset",
        "//core/registry",
        "//hybrid/internal/hpke",
        "//hybrid/subtle",
        "//internal/internalregistry",
        "//internal/monitoringutil",
        "//internal/tinkerror",
        "//keyset",
        "//monitoring",
        "//proto/aes_ctr_hmac_aead_go_proto",
        "//proto/aes_gcm_go_proto",
        "//proto/aes_siv_go_proto",
        "//proto/common_go_proto",
        "//proto/ecies_aead_hkdf_go_proto",
        "//proto/hpke_go_proto",
        "//proto/tink_go_proto",
        "//subtle",
        "//tink",
        "@org_golang_google_protobuf//proto",
    ],
)

go_test(
    name = "hybrid_test",
    srcs = [
        "ecies_aead_hkdf_dem_helper_test.go",
        "ecies_aead_hkdf_hybrid_decrypt_test.go",
        "ecies_aead_hkdf_hybrid_encrypt_test.go",
        "ecies_aead_hkdf_private_key_manager_test.go",
        "ecies_aead_hkdf_public_key_manager_test.go",
        "ecies_aead_hkdf_test.go",
        "hpke_private_key_manager_test.go",
        "hpke_public_key_manager_test.go",
        "hybrid_factory_test.go",
        "hybrid_key_templates_test.go",
        "hybrid_test.go",
    ],
    embed = [":hybrid"],
    deps = [
        "//aead",
        "//core/cryptofmt",
        "//core/registry",
        "//daead",
        "//hybrid/internal/hpke",
        "//hybrid/subtle",
        "//insecurecleartextkeyset",
        "//internal/internalregistry",
        "//keyset",
        "//mac",
        "//monitoring",
        "//proto/common_go_proto",
        "//proto/ecies_aead_hkdf_go_proto",
        "//proto/hpke_go_proto",
        "//proto/tink_go_proto",
        "//signature",
        "//subtle",
        "//subtle/random",
        "//testing/fakemonitoring",
        "//testkeyset",
        "//testutil",
        "//tink",
        "@com_github_google_go_cmp//cmp",
        "@com_github_google_go_cmp//cmp/cmpopts",
        "@org_golang_google_protobuf//proto",
        "@org_golang_google_protobuf//testing/protocmp",
    ],
)

alias(
    name = "go_default_library",
    actual = ":hybrid",
    visibility = ["//visibility:public"],
)
